<template>
  <div id="app">
  <p>
    <el-row>
      <div class="logo_font">
        <!-- logo -->
        <el-col :span="17">
          <i class="el-icon-s-goods"></i>{{title}}<i class="el-icon-s-custom"></i>&nbsp;商品分类
        </el-col>
        <!-- 返回主页 -->
        <el-col :span="3">
          <el-button type="success" plain @click="index()"><i class="el-icon-shopping-bag-1 buyer_info"></i>&nbsp;返回商城主页</el-button>
        </el-col>
      </div>
    </el-row>
  </p>

<!-- 轮播图 -->
  <el-carousel :interval="4000" type="card" height="350px">
    <el-carousel-item>
      <img src="https://img12.360buyimg.com/n1/jfs/t1/104692/30/19292/102657/5e9d327eEfdf4cfeb/a4ccd28b8b593670.jpg">
    </el-carousel-item>
    <el-carousel-item>
      <img src="https://img10.360buyimg.com/n1/jfs/t1/102333/13/19389/168068/5e9e8225Eafb452b9/9094755927324083.jpg">
    </el-carousel-item>
    <el-carousel-item>
      <img src="https://img13.360buyimg.com/n1/jfs/t1/99531/30/9201/63403/5e0abca8E0ff58505/e089d403a28d5a4c.jpg">
    </el-carousel-item>
    <el-carousel-item>
      <img src="https://img13.360buyimg.com/n1/jfs/t1/136722/37/3809/129029/5f02ce97E51442b47/663e71bea0a2b5d5.jpg">
    </el-carousel-item>
    <el-carousel-item>
      <img src="https://img13.360buyimg.com/n1/jfs/t1/142665/26/1863/57007/5efc4b29E11c5a892/d9e862238a04dd38.jpg">
    </el-carousel-item>
  </el-carousel>

  <!-- 分类导航-->
  <div>
    <el-dropdown>
      <el-button type="primary" plain><i class="el-icon-position buyer_info"></i>潮鞋</el-button>
        <el-dropdown-menu slot="dropdown">
        <el-dropdown-item @click="AJ()">AJ</el-dropdown-item>
        <el-dropdown-item @click="YZ()">Yeezy</el-dropdown-item>
        <el-dropdown-item @click="AF()">AF1</el-dropdown-item>
        <el-dropdown-item @click="union()">联名</el-dropdown-item>
      </el-dropdown-menu>
    </el-dropdown>
    <el-dropdown>
      <el-button type="primary" plain><i class="el-icon-bottom-right buyer_info"></i>服装</el-button>
        <el-dropdown-menu slot="dropdown">
        <el-dropdown-item @click="Tshirt()">T恤</el-dropdown-item>
        <el-dropdown-item @click="fleece()">卫衣</el-dropdown-item>
        <el-dropdown-item @click="pants()">裤装</el-dropdown-item>
      </el-dropdown-menu>
    </el-dropdown>
    <el-dropdown>
      <el-button type="primary" plain><i class="el-icon-basketball buyer_info"></i>潮玩</el-button>
        <el-dropdown-menu slot="dropdown">
        <el-dropdown-item @click="bandai()">万代</el-dropdown-item>
        <el-dropdown-item @click="LEGO()">乐高</el-dropdown-item>
        <el-dropdown-item @click="MF()">麦克法兰</el-dropdown-item>
      </el-dropdown-menu>
    </el-dropdown>
    <el-dropdown>
      <el-button type="primary" plain><i class="el-icon-watch buyer_info"></i>配饰</el-button>
        <el-dropdown-menu slot="dropdown">
        <el-dropdown-item @click="watches()">手表</el-dropdown-item>
        <el-dropdown-item @click="necklace()">项链</el-dropdown-item>
        <el-dropdown-item @click="bracelet()">手环</el-dropdown-item>
      </el-dropdown-menu>
    </el-dropdown>

    <el-dropdown>
      <el-button type="primary" plain @click="cart()"><i class="el-icon-shopping-cart-2 buyer_info"></i>购物车</el-button>
    </el-dropdown>

    <el-dropdown>
      <el-button type="primary" plain @click="center()"><i class="el-icon-s-custom buyer_info"></i>个人中心</el-button>
    </el-dropdown>
    <!-- <el-button type="success" plain @click="clothes()"><i class="el-icon-bottom-right buyer_info"></i>服装</el-button>
    <el-button type="success" plain @click="toys()"><i class="el-icon-basketball buyer_info"></i>潮玩</el-button>
    <el-button type="success" plain @click="equip()"><i class="el-icon-watch buyer_info"></i>配饰</el-button>
    <el-button type="success" plain @click="cart()"><i class="el-icon-shopping-cart-2 buyer_info"></i>购物车</el-button>
    <el-button type="success" plain @click="center()"><i class="el-icon-s-custom buyer_info"></i>个人中心</el-button> -->
  </div>

  <!-- 分割线 -->
  <el-divider></el-divider>

  <!-- 商品显示 -->
  <div class="demo-image__preview">
        <div id="goods" v-for="i in 12">
          <div>
            <el-image style="width: 300px; height: 300px" :src="url" :preview-src-list="srcList">
            </el-image>
          </div>
          <div class="right">
            <el-tooltip class="item" effect="dark" content="双十一折扣价" placement="right-start">
              <el-button>￥1409.00</el-button>
            </el-tooltip>
          </div>
          &nbsp;
          <div class="right">
            <el-tooltip class="item" effect="dark" content="最新款" placement="right-start">
              <el-button>红蓝彩钩鸳鸯</el-button>
            </el-tooltip>
          </div>
          &nbsp;
          <el-rate v-model="value" disabled show-score text-color="#ff9900" score-template="{value}">
          </el-rate>
        </div>
      </div>
      <router-view />
    </div>
  </template>
  </div>
</template>

<script>
  export default {
    name: 'productionType',
    data() {
      return {
        value: 3.7,
        title: "“码”上商城 -- ",
        imageUrl: '',
        url: 'https://img10.360buyimg.com/n1/jfs/t1/122486/37/5960/170102/5efbe820Ec8f9b2af/feb3ee4866200846.jpg',
        srcList: [
          'https://img10.360buyimg.com/n1/jfs/t1/122486/37/5960/170102/5efbe820Ec8f9b2af/feb3ee4866200846.jpg'
        ],
        activeIndex2: '1'
        }

      },
      methods: {
        loadAll() {
          return [{
            "value": "AJ1冰海蓝"
          }, {
            "value": "AJ11康扣"
          }, {
            "value": "老北京布鞋"
          }];
        },
        index: function() {
          // 跳转商城主页
          this.$router.push("/index");
        },
        AJ: function() {
          //鞋类二级分类，发送查询对应商品的AXIOS

        },
        YZ: function() {



        },
        AF: function() {



        },
        union: function() {



        },
        Tshirt: function() {
           //服装二级分类，发送查询对应商品的AXIOS


        },
        fleece: function() {



        },
        pants: function() {
        
        
        
        },
        toys: function() {
          //玩具二级分类，发送查询对应商品的AXIOS


        },
        bandai: function() {



        },
        LEGO: function() {



        },
        MF: function() {



        },
        watches: function() {
          //配饰二级分类，发送对应商品AXIOS请求


        },
        necklace: function() {


        },
        bracelet: function() {


        },
        cart: function() {
          //跳转购物车
          this.$router.push('/carInfo');

        },
        center: function() {
          //跳转个人中心
          this.$router.push('/buyerInfo');
        },

          handleClick() {
                alert('button click');
              }
      }
    }
</script>

<style>
  .logo_font {
    font-size: 30px;
    line-height: 1.7;
    font-family: "PingFang SC";
    text-align: left;
    margin-left: 100px;
  }

  .buyer_info {
    text-decoration: none;
    font-family: "PingFang SC";
    font-size: 20px;
    line-height: 10px;
  }

  .avatar-uploader .el-upload {
    border: 1px dashed #d9d9d9;
    border-radius: 6px;
    cursor: pointer;
    position: relative;
    overflow: hidden;
  }

  .avatar-uploader .el-upload:hover {
    border-color: #409EFF;
  }

  .avatar-uploader-icon {
    font-size: 28px;
    color: #8c939d;
    width: 178px;
    height: 178px;
    line-height: 178px;
    text-align: center;
  }

  .avatar {
    width: 178px;
    height: 178px;
    display: block;
  }

  .el-tag+.el-tag {
    margin-left: 10px;
  }

  .button-new-tag {
    margin-left: 10px;
    height: 32px;
    line-height: 30px;
    padding-top: 0;
    padding-bottom: 0;
  }

  .input-new-tag {
    width: 90px;
    margin-left: 10px;
    vertical-align: bottom;
  }

  .tag {
    font-size: 20px;
  }

  #goods {
    height: 450px;
    width: 350px;
    display: inline-block;
  }

   .el-dropdown {
      vertical-align: top;
    }
    .el-dropdown + .el-dropdown {
      margin-left: 15px;
    }
    .el-icon-arrow-down {
      font-size: 12px;
    }
</style>
